package com.example.camerademo;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity implements OnClickListener {
	Button btn_common, btn_surface;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
    }
	private void initView() {
		btn_common=(Button) findViewById(R.id.btn_common);
		btn_surface=(Button) findViewById(R.id.btn_surface);
		btn_common.setOnClickListener(this);
		btn_surface.setOnClickListener(this);	
	}
	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.btn_common:
			Intent intent1=new Intent(MainActivity.this,CommonCamera.class);
			startActivity(intent1);
			break;
		case R.id.btn_surface:
			Intent intent2=new Intent(MainActivity.this,SurfaceCamera.class);
			startActivity(intent2);
			break;

		default:
			break;
		}
	}

}
